﻿using System;
using System.Collections;

namespace Freedom.Common.Collections
{
    /// <summary>
    /// IObjectCollectionBase
    /// </summary>
    public interface IObjectCollectionBase : IEnumerable
    {
        /// <summary>
        /// Gets the count instances.
        /// </summary>
        /// <value>The count.</value>
        int Count { get; }
        /// <summary>
        /// Occurs when [collection reload].
        /// </summary>
        event EventHandler CollectionReload;

        /// <summary>
        /// Refreshes this instance.
        /// </summary>
        void Refresh();

        /// <summary>
        /// Toes the array.
        /// </summary>
        /// <returns></returns>
        object[] ToArray();
    }
}